<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #f9f7e8;
            /* 禁止选取 */
            user-select: none;
        }

        .box {
            width: 300px;
            height: 300px;
            border: 1px solid red;
            border-radius: 50%;
            margin: auto;
            font-size: 26px;
            font-weight: bold;
            text-align: center;
            /* 变成大写 */
            text-transform: uppercase;
            animation: sp 20s linear infinite;
        }

        .box span {
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
        }
        /* 动画 */
        @keyframes sp {
            0% {
                transform: rotate(360deg);
            }

            100% {
                transform: rotate(0);
            }
        }
    </style>
</head>

<body>
    <div class="box">
        helloworldhelloworld
    </div>
</body>
<script>
    const box = document.querySelector(".box")
    const text = box.innerText
    box.innerText=""
    for(let i=0;i<text.length;i++){
        //循环文本
        let item=text[i]
        let span =document.createElement("span")
        box.appendChild(span)
        span.innerText=item
        //计算每一个字的旋转角度
        let r =(360/text.length)*i
        span.style.transform =`rotate(${r}deg)`
    }
</script>

</html>